import {observable, action} from 'mobx';
import { WeaTools } from 'ecCom';

class OutterSysMoreStore {
  @observable state = 0;
  @observable dataSource = [];
  @observable pageSize = 10;
  @observable goPage = 1;
  @observable total = 0;
  @observable viewType = '1';
  constructor() {
  	this.getDatas = this.getDatas.bind(this);
  }
  @action 
  getDatas(params = {}){
    this.pageSize = params.pageSize || 10;
    this.goPage = params.goPage || 1;
    WeaTools.callApi('/api/portal/elementtoolbar/outtersysmore', 'POST', {...params}).then(result => {
        this.status = result.status || 1;
        this.dataSource = result.data;
        this.viewType = result.viewType;
        this.total = result.total;
    });
  }
}
export default OutterSysMoreStore;